﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="PIPTransfer.aspx.cs" Inherits="Hisun.View.Calculation.PIPTransfer" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>无标题页</title>
</head>
<body>
    <form id="form1" runat="server">
     <div class =" CommonPage_MainPanel">
    <div class ="CommonPage_Banner"><div class = "CommomPage_Title">成本期初信息调整设置</div></div>
    <div class ="CommonPage_Body">

    
        <table style="width:100%;">
            <tr>
                <td>
                    
                </td>
            </tr>
            <tr>
                <td>
                    <asp:Panel ID="Panel_Main" runat="server">
                        <asp:Button SkinID = "Button" ID="Button_Add" runat="server" Text="增加" 
                            onclick="Button_Add_Click" />
                        <asp:GridView ID="GridView_DataQuery" runat="server" 
                            AutoGenerateColumns="False" SkinID="GridView">
                            <Columns>
                                <asp:BoundField DataField="转出中间体ID" HeaderText="转出中间体ID" />
                                <asp:BoundField DataField="转出中间体名称" HeaderText="转出中间体名称" />
                                <asp:BoundField DataField="目标中间体ID" HeaderText="目标中间体ID" />
                                <asp:BoundField DataField="目标中间体名称" HeaderText="目标中间体名称" />
                                <asp:TemplateField>
                                    <ItemTemplate>
                                        <asp:Button SkinID = "Button" ID="Button_Del" runat="server" CommandArgument='<%# Eval("ID") %>' 
                                            Text="删除" oncommand="Button_Del_Command" />
                                    </ItemTemplate>
                                </asp:TemplateField>
                            </Columns>
                        </asp:GridView>
                    </asp:Panel>
                </td>
            </tr>
            <tr>
                <td>
                    <asp:Panel ID="Panel_Add" runat="server" Visible="False">
                        <table style="width:100%;">
                            <tr>
                                <td>
                                    <asp:Label ID="Label1" runat="server" Text="转出作业中心：" SkinID="Label"></asp:Label>
                                    <asp:DropDownList ID="DropDownList_CenterList_Start" runat="server" 
                                        Height="21px" Width="161px" AutoPostBack="True" SkinID="DropdownList">
                                    </asp:DropDownList>
                                </td>
                                <td>
                                    <asp:Label ID="Label2" runat="server" Text="转出中间体：" SkinID="Label"></asp:Label>
                                    <asp:DropDownList ID="DropDownList_PIP_Start" runat="server" Height="21px" 
                                        Width="203px" DataSourceID="LinqDataSource_Start" DataTextField="中间体名称" 
                                        DataValueField="中间体ID" SkinID="DropdownList">
                                    </asp:DropDownList>
                                    <asp:LinqDataSource ID="LinqDataSource_Start" runat="server" 
                                        ContextTypeName="Hisun.Models.HisunDBDataContext" Select="new (中间体ID, 中间体名称)" 
                                        TableName="TABC_JS_ProductInProcess" 
                                        Where="作业中心ID == @作业中心ID &amp;&amp; 可用 == @可用">
                                        <WhereParameters>
                                            <asp:ControlParameter ControlID="DropDownList_CenterList_Start" Name="作业中心ID" 
                                                PropertyName="SelectedValue" Type="Int32" />
                                            <asp:Parameter DefaultValue="true" Name="可用" Type="Boolean" />
                                        </WhereParameters>
                                    </asp:LinqDataSource>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <asp:Label ID="Label3" runat="server" Text="目标作业中心：" SkinID="Label"></asp:Label>
                                    <asp:DropDownList ID="DropDownList_CenterList_Final" runat="server" Height="21px" 
                                        Width="161px" AutoPostBack="True" SkinID="DropdownList" >
                                    </asp:DropDownList>
                                </td>
                                <td>
                                    <asp:Label ID="Label4" runat="server" Text="目标中间体：" SkinID="Label"></asp:Label>
                                    <asp:DropDownList ID="DropDownList_PIP_Final" runat="server" Height="21px" 
                                        Width="203px" DataSourceID="LinqDataSource_Final" DataTextField="中间体名称" 
                                        DataValueField="中间体ID" SkinID="DropdownList">
                                    </asp:DropDownList>
                                    <asp:LinqDataSource ID="LinqDataSource_Final" runat="server" 
                                        ContextTypeName="Hisun.Models.HisunDBDataContext" Select="new (中间体ID, 中间体名称)" 
                                        TableName="TABC_JS_ProductInProcess" 
                                        Where="可用 == @可用 &amp;&amp; 作业中心ID == @作业中心ID">
                                        <WhereParameters>
                                            <asp:Parameter DefaultValue="true" Name="可用" Type="Boolean" />
                                            <asp:ControlParameter ControlID="DropDownList_CenterList_Final" Name="作业中心ID" 
                                                PropertyName="SelectedValue" Type="Int32" />
                                        </WhereParameters>
                                    </asp:LinqDataSource>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <asp:Button SkinID = "Button" ID="Button_Save" runat="server" Text="保存" 
                                        onclick="Button_Save_Click" />
                                    <asp:Button SkinID = "Button" ID="Button_Cancel" runat="server" Text="取消" 
                                        onclick="Button_Cancel_Click" />
                                </td>
                                <td>
                                    &nbsp;</td>
                            </tr>
                        </table>
                    </asp:Panel>
                </td>
            </tr>
        </table>
    
    </div></div>
    </form>
</body>
</html>
<%=alter %>